home *** CD-ROM | disk | FTP | other *** search
/ Aminet 31 / Aminet 31 (1999)(Schatztruhe)[!][Jun 1999].iso / Aminet / dev / gui / gui4cli.lha / Gui4Cli / Dir / Dir.zip < prev   
Text File  |  1999-04-21  |  1KB  |  77 lines

  1. G4C
  2.  
  3.  
  4. WINBIG -1 -1 423 39 'ZIP selected files/dirs to :'
  5. WinType 11110010
  6. varpath dir.gc
  7.  
  8. BOX 0 0 0 0 out button
  9.  
  10. xOnLoad
  11. gosub dir.zip startup
  12.  
  13. xOnReload
  14. gosub dir.zip startup
  15.  
  16. xRoutine StartUp
  17. old_dir  = $$G4C.DIR
  18. cd $$lv.dir
  19. lvmulti first
  20. if $lv_file = ""
  21.    ezreq "ZIP:\nChoose some files first\nwhy don't you ?" OK ""
  22.    guiquit dir.zip
  23.    stop
  24. endif
  25. guiopen dir.zip
  26.  
  27. xOnOpen
  28. setgad dir.zip 2 ON
  29.  
  30. xOnClose
  31. guiquit dir.zip
  32.  
  33. xOnQuit
  34. cd $old_dir
  35.  
  36. xOnFail
  37. guiwindow dir.zip resume
  38.  
  39. ;========================= Gadgets
  40.  
  41. XTEXTIN 10 5 400 14 "" zipname "RAM:MyFiles.zip" 130
  42. gadid 2
  43. gadhelp 'Enter name of Archive'
  44.  
  45. XBUTTON 10 20 99 14 "Pack"
  46. gadhelp 'Click to start packing...'
  47. zipcom = 'zip -r $zipname'
  48. while $lv_file > ""
  49.     extract lv_file file zipfile
  50.     appvar  zipcom ' $zipfile'
  51.     lvmulti next
  52. endwhile
  53. setwintitle dir.zip "Ziping files..."
  54. LAUNCH 1 '$zipcom'
  55. guiwindow dir.zip wait
  56.  
  57.  
  58. xOnReturn 1
  59. guiwindow dir.zip resume
  60. guiquit dir.zip
  61.  
  62.  
  63. XBUTTON 230 20 78 14 "Browse.."
  64. gadhelp 'Choose another archive path'
  65. zipreq = ""
  66. ReqFile -1 -1 300 -40 'Destination archive:' SAVE zipreq RAM:
  67. if $zipreq > ""
  68.    zipname = $zipreq
  69.    update dir.zip 2 $zipname
  70. endif
  71.  
  72.  
  73. XBUTTON 310 20 100 14 CANCEL
  74. GuiQuit dir.zip
  75.  
  76.  
  77.